package schedule;

import java.util.Vector;

import action.ActionSInterface;

/**
 * 
 * 
 * @author Minodor
 * 
 *         a Raw Schedule
 */
public class RawSchedule implements Schedule {
	Vector<ActionSInterface> actions = null;

	public RawSchedule() {
		actions = new Vector<ActionSInterface>();
	}

	public void add(ActionSInterface nextAction) {
		this.actions.add(nextAction);
	}

	@Override
	public void add(int index, ActionSInterface nextAction) {
		actions.add(index, nextAction);
	}

	public ActionSInterface get(int index) {
		return this.actions.get(index);
	}

	public Vector<ActionSInterface> getActions() {
		return this.actions;
	}

	public int getActionsCount() {
		int result = this.actions.size();
		return result;
	}

	@Override
	public String toString() {
		String result = new String();
		for (int i = 0; i < actions.size(); i++) {
			result += actions.get(i).getExecuteTimer() + "\n";
		}
		return result;
	}

}
